package a.f;

import a.c.ab;
import a.c.bb;
import a.c.*;
import a.d.s;
import a.d.v;

import java.awt.geom.Rectangle2D;
import java.util.*;

public class t
  extends r
{
  public static final Object g = "y.layout.ComponentLayouter.LAYOUT_NODE_DPKEY";
  public static final Object h = "y.layout.ComponentLayouter.GIVEN_COMPONENT_ID_DPKEY";
  public static final byte i = 0;
  public static final byte j = 1;
  public static final byte k = 2;
  public static final byte l = 3;
  public static final byte m = 4;
  public static final byte n = 5;
  public static final byte o = 6;
  public static final byte p = 7;
  public static final byte q = 31;
  public static final byte r = 32;
  public static final byte s = 64;
  private double t;
  private double u;
  private double v;
  private double w = 45.0D;
  private boolean x = true;
  private boolean y = true;
  private byte z = 1;
  private boolean A = true;
  private f_[] B;
  public static boolean C;
  
  public t(rc paramrc)
  {
    this();
    a(paramrc);
  }
  
  public t()
  {
    a(400.0D, 400.0D);
  }
  
  public void a(double paramDouble1, double paramDouble2)
  {
    this.t = paramDouble1;
    this.u = paramDouble2;
  }
  
  public s b()
  {
    return new s(this.t, this.u);
  }
  
  public boolean canLayout(o paramo)
  {
    boolean bool2 = o.eg;
    int i7 = o.dg;
    if ((bool2) || (paramo.n())) {
      return true;
    }
    if (a() != null)
    {
      boolean bool1 = true;
      a.c.x localx = paramo.B();
      int i1 = a(paramo, localx);
      ArrayList[] arrayOfArrayList1 = new ArrayList[i1];
      ArrayList[] arrayOfArrayList2 = new ArrayList[i1];
      boolean[] arrayOfBoolean = new boolean[i1];
      int i2 = Math.max(15, paramo.j() / i1);
      int i3 = Math.max(15, paramo.l() / i1);
      k localk = paramo.c(g);
      int i4 = 0;
      do
      {
        if (i4 >= i1) {
          break;
        }
        arrayOfArrayList1[i4] = new ArrayList(i2);
        arrayOfArrayList2[i4] = new ArrayList(i3);
        if (i7 != 0) {
          break label379;
        }
        arrayOfBoolean[i4] = (localk == null ? 1 : false);
        i4++;
      } while (i7 == 0);
      if (!bool2)
      {
        Object localObject1 = paramo.w();
        Object localObject2;
        do
        {
          if (!((a.c.m)localObject1).e()) {
            break;
          }
          localObject2 = ((a.c.m)localObject1).a();
          arrayOfArrayList2[localx.getInt(localObject2.e())].add(localObject2);
          if (!bool2)
          {
            if (i7 != 0) {
              break label250;
            }
            paramo.f((d)localObject2);
            ((a.c.m)localObject1).f();
          }
        } while (i7 == 0);
        label250:
        localObject1 = paramo.v();
        do
        {
          if (!((a.c.w)localObject1).e()) {
            break;
          }
          localObject2 = ((a.c.w)localObject1).d();
          if (!bool2)
          {
            if (i7 != 0) {
              break label366;
            }
            arrayOfArrayList1[localx.getInt(localObject2)].add(localObject2);
            paramo.d(((a.c.w)localObject1).d());
          }
          if (!bool2)
          {
            if (localk != null)
            {
              if (bool2) {
                continue;
              }
              if (localk.getBool(localObject2)) {
                arrayOfBoolean[localx.getInt(localObject2)] = true;
              }
            }
            ((a.c.w)localObject1).f();
          }
        } while (i7 == 0);
        label366:
        int i5 = 0;
        label379:
        int i6;
        label466:
        label468:
        label596:
        do
        {
          if (i5 >= i1) {
            break;
          }
          if (i7 != 0) {
            break label662;
          }
          if (arrayOfBoolean[i5] != 0)
          {
            i6 = arrayOfArrayList1[i5].size() - 1;
            do
            {
              do
              {
                if (i6 < 0) {
                  break;
                }
                paramo.e((e)arrayOfArrayList1[i5].get(i6));
                i6--;
                if (bool2) {
                  break label468;
                }
                if (i7 != 0) {
                  break label466;
                }
              } while (i7 == 0);
            } while (bool2);
            i6 = arrayOfArrayList2[i5].size() - 1;
            do
            {
              do
              {
                if (i6 < 0) {
                  break;
                }
                paramo.g((d)arrayOfArrayList2[i5].get(i6));
                i6--;
                if (bool2) {
                  break label531;
                }
                if (i7 != 0) {
                  break label519;
                }
              } while (i7 == 0);
            } while (bool2);
            bool1 = b(paramo);
            i6 = arrayOfArrayList2[i5].size() - 1;
            do
            {
              do
              {
                if (i6 < 0) {
                  break;
                }
                paramo.f((d)arrayOfArrayList2[i5].get(i6));
                i6--;
                if (bool2) {
                  break label596;
                }
                if (i7 != 0) {
                  break label594;
                }
              } while (i7 == 0);
            } while (bool2);
            i6 = arrayOfArrayList1[i5].size() - 1;
            do
            {
              do
              {
                if (i6 < 0) {
                  break;
                }
                paramo.d((e)arrayOfArrayList1[i5].get(i6));
                i6--;
                if (bool2) {
                  break label653;
                }
                if (i7 != 0) {
                  break label651;
                }
              } while (i7 == 0);
            } while (bool2);
            if (!bool1) {
              break;
            }
          }
          i5++;
        } while (i7 == 0);
        label519:
        label531:
        label594:
        if (!bool2) {
          i5 = 0;
        }
        label651:
        label653:
        label662:
        label751:
        label753:
        do
        {
          if (i5 >= i1) {
            break;
          }
          if (i7 != 0) {
            break label812;
          }
          i6 = arrayOfArrayList1[i5].size() - 1;
          do
          {
            do
            {
              if (i6 < 0) {
                break;
              }
              paramo.e((e)arrayOfArrayList1[i5].get(i6));
              i6--;
              if (bool2) {
                break label753;
              }
              if (i7 != 0) {
                break label751;
              }
            } while (i7 == 0);
          } while (bool2);
          i6 = arrayOfArrayList2[i5].size() - 1;
          if (i6 >= 0)
          {
            paramo.g((d)arrayOfArrayList2[i5].get(i6));
            i6--;
          }
          for (;;)
          {
            if (!bool2) {
              if (i7 == 0)
              {
                if (i7 == 0) {
                  break;
                }
                if (bool2) {
                  continue;
                }
                i5++;
              }
            }
          }
        } while (i7 == 0);
      }
      paramo.a(localx);
      label812:
      return bool1;
    }
    return true;
  }
  
  protected int a(o paramo, a.c.x paramx)
  {
    boolean bool = o.eg;
    int i5 = o.dg;
    k localk = paramo.c(h);
    if (localk != null)
    {
      ArrayList localArrayList = new ArrayList();
      HashMap localHashMap = new HashMap();
      localHashMap.put(null, new ArrayList());
      Object localObject1 = paramo.v();
      Object localObject2;
      Object localObject3;
      Object localObject4;
      do
      {
        if (!((a.c.w)localObject1).e()) {
          break;
        }
        localObject2 = ((a.c.w)localObject1).d();
        localObject3 = localk.get(localObject2);
        localObject4 = (List)localHashMap.get(localObject3);
        if (i5 != 0) {
          break label177;
        }
        if (localObject4 == null)
        {
          localObject4 = new ArrayList();
          localHashMap.put(localObject3, localObject4);
          localArrayList.add(localObject3);
        }
        ((List)localObject4).add(localObject2);
        ((a.c.w)localObject1).f();
      } while (i5 == 0);
      label177:
      localObject1 = (List)localHashMap.get(null);
      localHashMap.remove(null);
      int i1;
      Object localObject5;
      if (!bool) {
        if (((List)localObject1).size() == 0)
        {
          if (!bool)
          {
            if (localHashMap.size() < 2)
            {
              localObject2 = paramo.v();
              do
              {
                do
                {
                  if (!((a.c.w)localObject2).e()) {
                    break;
                  }
                  localObject3 = ((a.c.w)localObject2).d();
                  paramx.a(localObject3, 0);
                  ((a.c.w)localObject2).f();
                } while (i5 == 0);
              } while (bool);
              return 1;
            }
            a.i.l.a(localArrayList, null);
          }
          i1 = 0;
          label374:
          label376:
          do
          {
            do
            {
              if (i1 >= localArrayList.size()) {
                break;
              }
              localObject3 = (List)localHashMap.get(localArrayList.get(i1));
              localObject4 = ((List)localObject3).iterator();
              do
              {
                if (!((Iterator)localObject4).hasNext()) {
                  break;
                }
                localObject5 = (e)((Iterator)localObject4).next();
                paramx.a(localObject5, i1);
                if (bool) {
                  break label376;
                }
                if (i5 != 0) {
                  break label374;
                }
              } while (i5 == 0);
              if (!bool) {
                i1++;
              }
            } while (i5 == 0);
          } while (bool);
          return localArrayList.size();
        }
      }
      if (!bool) {
        if (!localHashMap.isEmpty())
        {
          i1 = b(paramo, paramx);
          localObject3 = new int[i1];
          int i2 = 0;
          do
          {
            do
            {
              if (i2 >= localObject3.length) {
                break;
              }
              localObject3[i2] = -1;
              i2++;
              if (bool) {
                break label464;
              }
              if (i5 != 0) {
                break label462;
              }
            } while (i5 == 0);
          } while (bool);
          i2 = 0;
          label462:
          label464:
          Object localObject6;
          Object localObject7;
          label568:
          label570:
          do
          {
            do
            {
              if (i2 >= localArrayList.size()) {
                break;
              }
              localObject5 = (List)localHashMap.get(localArrayList.get(i2));
              if (bool) {
                break label586;
              }
              if (i5 != 0) {
                break label585;
              }
              localObject6 = ((List)localObject5).iterator();
              do
              {
                if (!((Iterator)localObject6).hasNext()) {
                  break;
                }
                localObject7 = (e)((Iterator)localObject6).next();
                localObject3[paramx.getInt(localObject7)] = i2;
                if (bool) {
                  break label570;
                }
                if (i5 != 0) {
                  break label568;
                }
              } while (i5 == 0);
              if (!bool) {
                i2++;
              }
            } while (i5 == 0);
          } while (bool);
          i2 = localArrayList.size();
          label585:
          label586:
          int i3 = 0;
          do
          {
            if (i3 >= localObject3.length) {
              break;
            }
            if (bool) {
              break label707;
            }
            if (i5 != 0) {
              break label702;
            }
            if (localObject3[i3] < 0) {
              localObject3[i3] = (i2++);
            }
            i3++;
          } while (i5 == 0);
          int i4;
          if (!bool)
          {
            Iterator localIterator = ((List)localObject1).iterator();
            do
            {
              do
              {
                if (!localIterator.hasNext()) {
                  break;
                }
                localObject6 = (e)localIterator.next();
                paramx.a(localObject6, localObject3[paramx.getInt(localObject6)]);
              } while (i5 == 0);
            } while (bool);
            i4 = 0;
          }
          label702:
          label707:
          do
          {
            if (i4 >= localArrayList.size()) {
              break;
            }
            localObject6 = (List)localHashMap.get(localArrayList.get(i4));
            localObject7 = ((List)localObject6).iterator();
            do
            {
              if (!((Iterator)localObject7).hasNext()) {
                break;
              }
              e locale = (e)((Iterator)localObject7).next();
              paramx.a(locale, i4);
              if (bool) {
                break label795;
              }
              if (i5 != 0) {
                break label793;
              }
            } while (i5 == 0);
            if (!bool) {
              i4++;
            }
          } while (i5 == 0);
          label793:
          label795:
          return i2;
        }
      }
      return b(paramo, paramx);
    }
    return b(paramo, paramx);
  }
  
  private int b(o paramo, a.c.x paramx)
  {
    boolean bool = o.eg;
    int i2 = o.dg;
    if (!bool) {
      if (g())
      {
        if (bool) {
          break label41;
        }
        if (h.b(paramo)) {
          break label40;
        }
      }
    }
    return a.a.m.a(paramo, paramx);
    label40:
    label41:
    k localk1 = paramo.c(i.a);
    k localk2 = paramo.c(i.b);
    HashMap localHashMap = new HashMap();
    Object localObject1 = paramo.v();
    if (((a.c.w)localObject1).e()) {}
    while (bool)
    {
      localHashMap.put(localk1.get(((a.c.w)localObject1).d()), ((a.c.w)localObject1).d());
      ((a.c.w)localObject1).f();
      if (i2 == 0) {
        break;
      }
    }
    localObject1 = new ab();
    a.c.w localw = paramo.v();
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        e locale1 = localw.d();
        Object localObject2 = localk2.get(locale1);
        if (!bool)
        {
          if (localObject2 != null)
          {
            e locale2 = (e)localHashMap.get(localObject2);
            if (bool) {
              continue;
            }
            if (locale2 != null) {
              ((ab)localObject1).c(paramo.a(locale1, locale2));
            }
          }
          localw.f();
        }
      } while (i2 == 0);
    } while (bool);
    int i1 = a.a.m.a(paramo, paramx);
    do
    {
      do
      {
        if (((ab)localObject1).size() <= 0) {
          break;
        }
        paramo.a(((ab)localObject1).o());
      } while (i2 == 0);
    } while (bool);
    return i1;
  }
  
  public void doLayout(o paramo)
  {
    boolean bool = o.eg;
    int i5 = o.dg;
    if (!bool) {
      if (paramo.n()) {
        return;
      }
    }
    a.c.x localx = paramo.B();
    try
    {
      a.i.y localy = new a.i.y(paramo);
      k localk1 = paramo.c(h);
      if (localk1 != null) {
        a(localy, paramo, localk1);
      }
      int i1 = a(paramo, localx);
      this.B = new f_[i1];
      k localk2 = paramo.c(g);
      int i2 = 0;
      do
      {
        if (i2 >= i1) {
          break;
        }
        this.B[i2] = new f_();
        if (i5 != 0) {
          break label1112;
        }
        this.B[i2].j = (localk2 == null);
        i2++;
      } while (i5 == 0);
      if (!bool)
      {
        Object localObject1 = paramo.w();
        Object localObject2;
        do
        {
          if (!((a.c.m)localObject1).e()) {
            break;
          }
          localObject2 = ((a.c.m)localObject1).a();
          this.B[localx.getInt(localObject2.e())].b.add(localObject2);
          paramo.f((d)localObject2);
          ((a.c.m)localObject1).f();
          if ((!bool) && (i5 != 0)) {
            break label1390;
          }
        } while (i5 == 0);
        if (!bool)
        {
          localObject1 = paramo.v();
          do
          {
            do
            {
              if (!((a.c.w)localObject1).e()) {
                break;
              }
              localObject2 = ((a.c.w)localObject1).d();
              if (i5 != 0) {
                break label1392;
              }
              if (localk2 != null)
              {
                if (bool) {
                  continue;
                }
                if (localk2.getBool(localObject2)) {
                  this.B[localx.getInt(localObject2)].j = true;
                }
              }
              this.B[localx.getInt(localObject2)].a.add(localObject2);
              paramo.d(((a.c.w)localObject1).d());
              ((a.c.w)localObject1).f();
            } while (i5 == 0);
          } while (bool);
          int i3 = 0;
          Object localObject3;
          label541:
          label594:
          label869:
          label871:
          Object localObject4;
          label922:
          do
          {
            do
            {
              do
              {
                if (i3 >= i1) {
                  break;
                }
                localObject2 = this.B[i3];
                ((f_)localObject2).f.x = 0.0D;
                ((f_)localObject2).f.y = 0.0D;
                if (i5 != 0) {
                  break label1118;
                }
                localObject3 = ((f_)localObject2).a.l();
                if (((a.c.w)localObject3).e())
                {
                  ((f_)localObject2).f.x += paramo.m(((a.c.w)localObject3).d());
                  if (bool) {}
                }
                else
                {
                  do
                  {
                    ((f_)localObject2).f.y += paramo.n(((a.c.w)localObject3).d());
                    paramo.e(((a.c.w)localObject3).d());
                    ((a.c.w)localObject3).f();
                    if (i5 != 0) {
                      break label541;
                    }
                    if (i5 == 0) {
                      break;
                    }
                    ((f_)localObject2).f.x /= ((f_)localObject2).a.size();
                  } while (bool);
                  ((f_)localObject2).f.y /= ((f_)localObject2).a.size();
                }
                localObject3 = ((f_)localObject2).b.l();
                do
                {
                  if (!((a.c.m)localObject3).e()) {
                    break label594;
                  }
                  paramo.g(((a.c.m)localObject3).a());
                  ((a.c.m)localObject3).f();
                  if ((!bool) && (i5 != 0)) {
                    break;
                  }
                } while (i5 == 0);
                localObject3 = c(paramo);
                ((f_)localObject2).g = new Rectangle2D.Double(((Rectangle2D)localObject3).getX(), ((Rectangle2D)localObject3).getY(), ((Rectangle2D)localObject3).getWidth(), ((Rectangle2D)localObject3).getHeight());
              } while (bool);
              if (!bool)
              {
                if (((f_)localObject2).j) {
                  a(paramo);
                }
                localObject3 = c(paramo);
                ((f_)localObject2).i = new a.d.t(((Rectangle2D)localObject3).getX(), ((Rectangle2D)localObject3).getY(), ((Rectangle2D)localObject3).getWidth(), ((Rectangle2D)localObject3).getHeight());
                if (!bool) {
                  ((f_)localObject2).e = new Rectangle2D.Double(((Rectangle2D)localObject3).getX(), ((Rectangle2D)localObject3).getY(), ((Rectangle2D)localObject3).getWidth(), ((Rectangle2D)localObject3).getHeight());
                }
              }
              else if (this.v > 0.0D)
              {
                double d1 = this.w + (Math.ceil((((Rectangle2D)localObject3).getWidth() + 1.0D) / this.v) + 1.0D) * this.v;
                double d2 = this.w + (Math.ceil((((Rectangle2D)localObject3).getHeight() + 1.0D) / this.v) + 1.0D) * this.v;
                if (bool) {
                  break label871;
                }
                ((f_)localObject2).h.setFrame(((Rectangle2D)localObject3).getX(), ((Rectangle2D)localObject3).getY(), d1, d2);
                if (i5 == 0) {
                  break label869;
                }
              }
              ((f_)localObject2).h.setFrame(((Rectangle2D)localObject3).getX(), ((Rectangle2D)localObject3).getY(), ((Rectangle2D)localObject3).getWidth() + this.w, ((Rectangle2D)localObject3).getHeight() + this.w);
              localObject4 = ((f_)localObject2).b.l();
              do
              {
                if (!((a.c.m)localObject4).e()) {
                  break label922;
                }
                paramo.f(((a.c.m)localObject4).a());
                ((a.c.m)localObject4).f();
                if ((!bool) && (i5 != 0)) {
                  break;
                }
              } while (i5 == 0);
              if (bool) {
                break label1118;
              }
              localObject4 = ((f_)localObject2).a.l();
              if (((a.c.w)localObject4).e())
              {
                ((f_)localObject2).d.x += paramo.m(((a.c.w)localObject4).d());
                ((f_)localObject2).d.y += paramo.n(((a.c.w)localObject4).d());
                paramo.d(((a.c.w)localObject4).d());
                ((a.c.w)localObject4).f();
              }
              for (;;)
              {
                if (!bool) {
                  if (i5 == 0)
                  {
                    if (i5 == 0) {
                      break;
                    }
                    ((f_)localObject2).d.x /= ((f_)localObject2).a.size();
                    ((f_)localObject2).d.y /= ((f_)localObject2).a.size();
                    if (bool) {
                      continue;
                    }
                    i3++;
                  }
                }
              }
            } while (i5 == 0);
          } while (bool);
          i3 = 0;
          label1112:
          label1118:
          do
          {
            if (i3 >= i1) {
              break;
            }
            if (i5 != 0) {
              break label1245;
            }
            do
            {
              localObject2 = this.B[i3].a.l();
              do
              {
                if (!((a.c.w)localObject2).e()) {
                  break label1163;
                }
                paramo.e(((a.c.w)localObject2).d());
                ((a.c.w)localObject2).f();
                if ((!bool) && (i5 != 0)) {
                  break;
                }
              } while (i5 == 0);
            } while (bool);
            localObject2 = this.B[i3].b.l();
            if (((a.c.m)localObject2).e())
            {
              paramo.g(((a.c.m)localObject2).a());
              ((a.c.m)localObject2).f();
            }
            for (;;)
            {
              if (!bool) {
                if (i5 == 0)
                {
                  if (i5 == 0) {
                    break;
                  }
                  if (bool) {
                    continue;
                  }
                  i3++;
                }
              }
            }
          } while (i5 == 0);
          label1163:
          if (!bool) {
            label1245:
            if ((bool) || (this.y))
            {
              bb[] arrayOfbb = new bb[i1];
              localObject2 = new ab[i1];
              localObject3 = new a.d.t[i1];
              localObject4 = new Rectangle2D.Double[i1];
              int i4 = 0;
              do
              {
                if (i4 >= i1) {
                  break;
                }
                arrayOfbb[i4] = this.B[i4].a;
                localObject2[i4] = this.B[i4].b;
                localObject3[i4] = this.B[i4].i;
                localObject4[i4] = this.B[i4].h;
                i4++;
                if ((!bool) && (i5 != 0)) {
                  break label1390;
                }
              } while (i5 == 0);
              if (bool) {
                break label1407;
              }
              a(paramo, arrayOfbb, (ab[])localObject2, (a.d.t[])localObject3, (Rectangle2D[])localObject4);
            }
          }
          label1390:
          if (localk1 != null) {
            label1392:
            a(localy);
          }
          a.i.n.a(this, "done !");
        }
      }
    }
    finally
    {
      label1407:
      this.B = null;
      paramo.a(localx);
    }
  }
  
  protected Rectangle2D c(o paramo)
  {
    return wc.a(paramo, paramo.v(), paramo.w(), c());
  }
  
  public void a(boolean paramBoolean)
  {
    this.A = paramBoolean;
  }
  
  public boolean c()
  {
    return this.A;
  }
  
  protected void a(o paramo, bb[] paramArrayOfbb, ab[] paramArrayOfab, a.d.t[] paramArrayOft, Rectangle2D[] paramArrayOfRectangle2D)
  {
    boolean bool2 = o.eg;
    int i10 = o.dg;
    int i1 = h();
    if (!bool2) {
      if ((i1 & 0x1F) >= 4)
      {
        if (!bool2) {}
        boolean bool1 = (i1 & 0x20) == 32;
        if (!bool2)
        {
          switch (i1 & 0x1F)
          {
          case 4: 
          default: 
            a(paramo, paramArrayOfbb, paramArrayOfab, paramArrayOft, paramArrayOfRectangle2D, false, true, bool1);
            if (!bool2) {
              if (i10 == 0) {
                return;
              }
            }
          case 5: 
            a(paramo, paramArrayOfbb, paramArrayOfab, paramArrayOft, paramArrayOfRectangle2D, false, false, bool1);
            if (!bool2) {
              if (i10 == 0) {
                return;
              }
            }
          case 6: 
            a(paramo, paramArrayOfbb, paramArrayOfab, paramArrayOft, paramArrayOfRectangle2D, true, true, bool1);
            if (bool2) {
              break label184;
            }
            if (i10 == 0) {
              return;
            }
            break;
          }
          a(paramo, paramArrayOfbb, paramArrayOfab, paramArrayOft, paramArrayOfRectangle2D, true, false, bool1);
        }
        label184:
        if ((!bool2) && (i10 == 0)) {
          return;
        }
      }
    }
    if (!bool2)
    {
      Integer[] arrayOfInteger;
      double d1;
      label361:
      label362:
      int i8;
      int i9;
      switch (i1 & 0x1F)
      {
      case 1: 
      default: 
        wc.a(paramArrayOfRectangle2D, null, this.t / this.u);
        if (bool2) {
          break label1061;
        }
        if (i10 == 0) {
          break;
        }
      case 2: 
        arrayOfInteger = new Integer[paramArrayOfbb.length];
        d1 = -1.797693134862316E+308D;
        int i5 = 0;
        do
        {
          do
          {
            if (i5 >= arrayOfInteger.length) {
              break;
            }
            arrayOfInteger[i5] = new Integer(i5);
            if (bool2) {
              break label362;
            }
            d1 = Math.max(d1, this.B[i5].e.getHeight());
            i5++;
            if (i10 != 0) {
              break label361;
            }
          } while (i10 == 0);
        } while (bool2);
        if ((i1 & 0x20) == 32) {
          a.i.l.a(arrayOfInteger, new Comparator()
          {
            public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
            {
              int i = ((Integer)paramAnonymousObject1).intValue();
              int j = ((Integer)paramAnonymousObject2).intValue();
              return a.i.l.a(t.this.B[i].f.x, t.this.B[j].f.x);
            }
          });
        }
        double d4 = 0.0D;
        i8 = 0;
        do
        {
          if (i8 >= arrayOfInteger.length) {
            break;
          }
          i9 = arrayOfInteger[i8].intValue();
          paramArrayOfRectangle2D[i9].setFrame(d4, (d1 - paramArrayOfRectangle2D[i9].getHeight()) * 0.5D, paramArrayOfRectangle2D[i9].getWidth(), paramArrayOfRectangle2D[i9].getHeight());
          d4 += paramArrayOfRectangle2D[i9].getWidth();
          i8++;
          if (bool2) {
            break label1130;
          }
          if (i10 != 0) {
            break label1129;
          }
        } while (i10 == 0);
      case 3: 
        arrayOfInteger = new Integer[paramArrayOfbb.length];
        d1 = -1.797693134862316E+308D;
        if (bool2) {
          break label1056;
        }
        int i6 = 0;
        do
        {
          do
          {
            if (i6 >= arrayOfInteger.length) {
              break;
            }
            arrayOfInteger[i6] = new Integer(i6);
            if (bool2) {
              break label566;
            }
            d1 = Math.max(d1, this.B[i6].e.getWidth());
            i6++;
            if (i10 != 0) {
              break label565;
            }
          } while (i10 == 0);
        } while (bool2);
        if ((i1 & 0x20) == 32) {
          a.i.l.a(arrayOfInteger, new Comparator()
          {
            public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
            {
              int i = ((Integer)paramAnonymousObject1).intValue();
              int j = ((Integer)paramAnonymousObject2).intValue();
              return a.i.l.a(t.this.B[i].f.y, t.this.B[j].f.y);
            }
          });
        }
        double d5 = 0.0D;
        i8 = 0;
        do
        {
          if (i8 >= arrayOfInteger.length) {
            break;
          }
          i9 = arrayOfInteger[i8].intValue();
          paramArrayOfRectangle2D[i9].setFrame((d1 - paramArrayOfRectangle2D[i9].getWidth()) * 0.5D, d5, paramArrayOfRectangle2D[i9].getWidth(), paramArrayOfRectangle2D[i9].getHeight());
          d5 += paramArrayOfRectangle2D[i9].getHeight();
          i8++;
          if (bool2) {
            break label1130;
          }
          if (i10 != 0) {
            break label1129;
          }
        } while (i10 == 0);
      case 0: 
        label565:
        label566:
        if (bool2) {
          break label1061;
        }
      }
    }
    else
    {
      int i2 = 0;
      Object localObject;
      do
      {
        do
        {
          if (i2 >= paramArrayOfRectangle2D.length) {
            break;
          }
          localObject = this.B[i2];
          double d3 = ((f_)localObject).f.x - ((f_)localObject).d.x;
          double d7 = ((f_)localObject).f.y - ((f_)localObject).d.y;
          paramArrayOfRectangle2D[i2].setRect(paramArrayOfRectangle2D[i2].getX() + d3, paramArrayOfRectangle2D[i2].getY() + d7, paramArrayOfRectangle2D[i2].getWidth(), paramArrayOfRectangle2D[i2].getHeight());
          i2++;
          if (bool2) {
            break label1061;
          }
          if (i10 != 0) {
            break label1050;
          }
        } while (i10 == 0);
        if (bool2) {
          break label1061;
        }
      } while (bool2);
      if ((i1 & 0x40) == 64)
      {
        q localq = new q();
        localObject = new e[this.B.length];
        int i4 = 0;
        do
        {
          if (i4 >= this.B.length) {
            break;
          }
          localObject[i4] = localq.i();
          zc localzc1 = localq.d(localObject[i4]);
          localzc1.b(paramArrayOfRectangle2D[i4].getWidth(), paramArrayOfRectangle2D[i4].getHeight());
          localzc1.a(paramArrayOfRectangle2D[i4].getX(), paramArrayOfRectangle2D[i4].getY());
          i4++;
          if (bool2) {
            break label1061;
          }
          if (i10 != 0) {
            break label1050;
          }
        } while (i10 == 0);
        a.f.g.l locall = new a.f.g.l();
        locall.b(true);
        locall.a(false);
        locall.a(0.0D);
        locall.a((byte)2);
        locall.doLayout(localq);
        if (bool2) {
          break label1061;
        }
        int i7 = 0;
        do
        {
          if (i7 >= this.B.length) {
            break;
          }
          zc localzc2 = localq.d(localObject[i7]);
          paramArrayOfRectangle2D[i7].setFrame(localzc2.a(), localzc2.b(), localzc2.c(), localzc2.d());
          i7++;
          if (bool2) {
            break label1130;
          }
          if (i10 != 0) {
            break label1129;
          }
        } while (i10 == 0);
      }
    }
    label1050:
    label1056:
    if (!bool2) {
      label1061:
      if (!bool2) {
        if (this.v <= 0.0D)
        {
          i3 = 0;
          do
          {
            if (i3 >= paramArrayOfRectangle2D.length) {
              break;
            }
            a(paramo, paramArrayOfbb[i3], paramArrayOfab[i3], new a.d.w(paramArrayOfRectangle2D[i3].getX(), paramArrayOfRectangle2D[i3].getY()), paramArrayOft[i3]);
            i3++;
          } while (i10 == 0);
        }
      }
    }
    label1129:
    label1130:
    int i3 = 0;
    do
    {
      if (i3 >= paramArrayOfRectangle2D.length) {
        break;
      }
      double d2 = Math.floor((paramArrayOfRectangle2D[i3].getX() - paramArrayOft[i3].d()) / this.v) * this.v;
      double d6 = Math.floor((paramArrayOfRectangle2D[i3].getY() - paramArrayOft[i3].e()) / this.v) * this.v;
      double d8 = paramArrayOft[i3].d() + d2;
      double d9 = paramArrayOft[i3].e() + d6;
      a(paramo, paramArrayOfbb[i3], paramArrayOfab[i3], new a.d.w(d8, d9), paramArrayOft[i3]);
      i3++;
    } while (i10 == 0);
  }
  
  public void b(boolean paramBoolean)
  {
    this.y = paramBoolean;
  }
  
  public boolean d()
  {
    return this.y;
  }
  
  protected void a(o paramo, bb parambb, ab paramab, a.d.w paramw, a.d.t paramt)
  {
    boolean bool = o.eg;
    int i1 = o.dg;
    double d1 = -paramt.d() + paramw.a();
    double d2 = -paramt.e() + paramw.b();
    Object localObject1 = parambb.l();
    Object localObject2;
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = paramo.r(((a.c.w)localObject1).d());
      paramo.b(((a.c.w)localObject1).d(), new a.d.w(((a.d.w)localObject2).a() + d1, ((a.d.w)localObject2).b() + d2));
      ((a.c.w)localObject1).f();
    } while (i1 == 0);
    localObject1 = paramab.l();
    label263:
    label265:
    do
    {
      if (!((a.c.m)localObject1).e()) {
        break;
      }
      localObject2 = ((a.c.m)localObject1).a();
      ArrayList localArrayList = new ArrayList();
      if (i1 != 0) {
        return;
      }
      a.c.y localy = paramo.l((d)localObject2).a();
      do
      {
        do
        {
          if (!localy.e()) {
            break;
          }
          a.d.w localw = (a.d.w)localy.j();
          localArrayList.add(new a.d.w(localw.a() + d1, localw.b() + d2));
          localy.f();
          if (bool) {
            break label265;
          }
          if (i1 != 0) {
            break label263;
          }
        } while (i1 == 0);
        paramo.b((d)localObject2, new a.d.y(localArrayList));
      } while (bool);
      ((a.c.m)localObject1).f();
    } while (i1 == 0);
    if (!bool) {
      c(paramo, parambb, paramab, paramw, paramt);
    }
  }
  
  private void a(a.i.y paramy, o paramo, k paramk)
  {
    boolean bool = o.eg;
    int i1 = o.dg;
    a.c.m localm = paramo.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      d locald = localm.a();
      if (!bool)
      {
        if ((paramk.get(locald.e()) != null) && ((bool) || (paramk.get(locald.f()) != null)))
        {
          if (bool) {
            continue;
          }
          if (!paramk.get(locald.e()).equals(paramk.get(locald.f()))) {
            paramy.a(locald);
          }
        }
        localm.f();
      }
    } while (i1 == 0);
  }
  
  private void a(a.i.y paramy)
  {
    paramy.g();
  }
  
  private void c(o paramo, bb parambb, ab paramab, a.d.w paramw, a.d.t paramt)
  {
    boolean bool = o.eg;
    int i2 = o.dg;
    k localk = paramo.c(oc.a);
    if (localk != null)
    {
      double d1 = -paramt.d() + paramw.a();
      double d2 = -paramt.e() + paramw.b();
      a.c.m localm = paramab.l();
      label163:
      label165:
      do
      {
        do
        {
          if (!localm.e()) {
            return;
          }
          kc[] arrayOfkc = (kc[])localk.get(localm.a());
          if (arrayOfkc != null)
          {
            int i1 = 0;
            do
            {
              if (i1 >= arrayOfkc.length) {
                break;
              }
              arrayOfkc[i1].b(arrayOfkc[i1].d() + d1, arrayOfkc[i1].e() + d2);
              i1++;
              if (bool) {
                break label165;
              }
              if (i2 != 0) {
                break label163;
              }
            } while (i2 == 0);
          }
        } while (bool);
        localm.f();
      } while (i2 == 0);
    }
  }
  
  public double e()
  {
    return this.v;
  }
  
  public void a(double paramDouble)
  {
    this.v = paramDouble;
  }
  
  public double f()
  {
    return this.w;
  }
  
  public void b(double paramDouble)
  {
    this.w = paramDouble;
  }
  
  public boolean g()
  {
    return this.x;
  }
  
  public void c(boolean paramBoolean)
  {
    this.x = paramBoolean;
  }
  
  public byte h()
  {
    return this.z;
  }
  
  public void a(byte paramByte)
  {
    this.z = paramByte;
  }
  
  private e_ a(o paramo, bb parambb, ab paramab, double paramDouble1, double paramDouble2, boolean paramBoolean)
  {
    boolean bool = o.eg;
    int i7 = o.dg;
    int i1 = 2147483647;
    int i2 = -2147483648;
    int i3 = 2147483647;
    int i4 = -2147483648;
    k localk = paramo.c(oc.a);
    Rectangle2D.Double localDouble = new Rectangle2D.Double();
    double d = f() * 0.5D;
    Object localObject1 = parambb.l();
    do
    {
      if (!((a.c.w)localObject1).e()) {
        break;
      }
      localObject2 = paramo.d(((a.c.w)localObject1).d());
      localDouble.setFrame(((zc)localObject2).a() - d, ((zc)localObject2).b() - d, ((zc)localObject2).c() + d * 2.0D, ((zc)localObject2).d() + d * 2.0D);
      i1 = Math.min((int)Math.floor(localDouble.x / paramDouble1), i1);
      i3 = Math.min((int)Math.floor(localDouble.y / paramDouble2), i3);
      i2 = Math.max((int)Math.floor((localDouble.x + localDouble.width) / paramDouble1), i2);
      i4 = Math.max((int)Math.floor((localDouble.y + localDouble.height) / paramDouble2), i4);
      ((a.c.w)localObject1).f();
    } while (i7 == 0);
    localObject1 = paramab.l();
    label417:
    label419:
    do
    {
      do
      {
        if (!((a.c.m)localObject1).e()) {
          break label422;
        }
        localObject2 = paramo.n(((a.c.m)localObject1).a());
        if (i7 != 0) {
          break label462;
        }
        a.d.x localx = ((a.d.y)localObject2).b();
        do
        {
          if (!localx.e()) {
            break;
          }
          i1 = Math.min(i1, (int)Math.floor(localx.a().a / paramDouble1));
          i2 = Math.max(i2, (int)Math.floor(localx.a().a / paramDouble1));
          i3 = Math.min(i3, (int)Math.floor(localx.a().b / paramDouble2));
          i4 = Math.max(i4, (int)Math.floor(localx.a().b / paramDouble2));
          localx.f();
          if (bool) {
            break label419;
          }
          if (i7 != 0) {
            break label417;
          }
        } while (i7 == 0);
      } while (bool);
      ((a.c.m)localObject1).f();
    } while (i7 == 0);
    label422:
    label462:
    v localv;
    if (!bool)
    {
      if (localk != null) {
        localObject1 = paramab.l();
      }
    }
    else {
      label658:
      label660:
      do
      {
        do
        {
          if (!((a.c.m)localObject1).e()) {
            break label663;
          }
          localObject2 = (kc[])localk.get(((a.c.m)localObject1).a());
          if (i7 != 0) {
            break label680;
          }
          if (localObject2 != null)
          {
            int i5 = 0;
            do
            {
              if (i5 >= localObject2.length) {
                break;
              }
              localv = localObject2[i5];
              localDouble.setFrame(localv.d() - d, localv.e() - d, localv.b() + d * 2.0D, localv.c() + d * 2.0D);
              i1 = Math.min((int)Math.floor(localDouble.x / paramDouble1), i1);
              i3 = Math.min((int)Math.floor(localDouble.y / paramDouble2), i3);
              i2 = Math.max((int)Math.floor((localDouble.x + localDouble.width) / paramDouble1), i2);
              i4 = Math.max((int)Math.floor((localDouble.y + localDouble.height) / paramDouble2), i4);
              i5++;
              if (bool) {
                break label660;
              }
              if (i7 != 0) {
                break label658;
              }
            } while (i7 == 0);
          }
        } while (bool);
        ((a.c.m)localObject1).f();
      } while (i7 == 0);
    }
    label663:
    i1 -= 2;
    i3 -= 2;
    i2 += 2;
    if (!bool) {
      i4 += 2;
    }
    label680:
    localObject1 = new e_(i1, i3, i2 - i1, i4 - i3);
    Object localObject2 = parambb.l();
    Object localObject3;
    do
    {
      if (!((a.c.w)localObject2).e()) {
        break;
      }
      localObject3 = paramo.d(((a.c.w)localObject2).d());
      localDouble.setFrame(((zc)localObject3).a() - d, ((zc)localObject3).b() - d, ((zc)localObject3).c() + d * 2.0D, ((zc)localObject3).d() + d * 2.0D);
      ((e_)localObject1).a((int)Math.floor(localDouble.x / paramDouble1), (int)Math.floor(localDouble.y / paramDouble2), 1 + (int)Math.floor((localDouble.x + localDouble.width) / paramDouble1), 1 + (int)Math.floor((localDouble.y + localDouble.height) / paramDouble2));
      ((a.c.w)localObject2).f();
    } while (i7 == 0);
    localObject2 = paramab.l();
    a.d.n localn;
    label1001:
    label1003:
    do
    {
      do
      {
        if (!((a.c.m)localObject2).e()) {
          break label1006;
        }
        localObject3 = paramo.n(((a.c.m)localObject2).a());
        if (i7 != 0) {
          break label1046;
        }
        localv = ((a.d.y)localObject3).l();
        do
        {
          if (!localv.e()) {
            break;
          }
          localn = localv.a();
          a((e_)localObject1, localn.d().a, localn.d().b, localn.e().a, localn.e().b, paramDouble1, paramDouble2);
          localv.f();
          if (bool) {
            break label1003;
          }
          if (i7 != 0) {
            break label1001;
          }
        } while (i7 == 0);
      } while (bool);
      ((a.c.m)localObject2).f();
    } while (i7 == 0);
    label1006:
    if (!bool)
    {
      if (localk == null) {
        break label1228;
      }
      localObject2 = paramab.l();
    }
    label1046:
    label1223:
    label1225:
    label1228:
    while (bool) {
      do
      {
        do
        {
          if (!((a.c.m)localObject2).e()) {
            break label1228;
          }
          localObject3 = (kc[])localk.get(((a.c.m)localObject2).a());
          if (i7 != 0) {
            break label1243;
          }
          if (localObject3 != null)
          {
            int i6 = 0;
            do
            {
              if (i6 >= localObject3.length) {
                break;
              }
              localn = localObject3[i6];
              localDouble.setFrame(localn.d() - d, localn.e() - d, localn.b() + d * 2.0D, localn.c() + d * 2.0D);
              ((e_)localObject1).a((int)Math.floor(localDouble.x / paramDouble1), (int)Math.floor(localDouble.y / paramDouble2), 1 + (int)Math.floor((localDouble.x + localDouble.width) / paramDouble1), 1 + (int)Math.floor((localDouble.y + localDouble.height) / paramDouble2));
              i6++;
              if (bool) {
                break label1225;
              }
              if (i7 != 0) {
                break label1223;
              }
            } while (i7 == 0);
          }
        } while (bool);
        ((a.c.m)localObject2).f();
      } while (i7 == 0);
    }
    if (paramBoolean) {
      ((e_)localObject1).c();
    }
    label1243:
    return localObject1;
  }
  
  static void a(e_ parame_, double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5, double paramDouble6)
  {
    boolean bool = o.eg;
    int i11 = o.dg;
    double d1 = paramDouble3 - paramDouble1;
    double d2 = paramDouble4 - paramDouble2;
    double d3 = 0.1D;
    if (!bool) {
      if (paramDouble5 > 1.0D)
      {
        int i1 = 1 + (int)Math.rint(paramDouble5);
        do
        {
          if (i1 <= 0) {
            break;
          }
          if (bool) {
            break label102;
          }
          d3 /= 10.0D;
          i1 /= 10;
          if (i11 != 0) {
            break label99;
          }
        } while (i11 == 0);
      }
    }
    if (!bool) {
      d3 = Math.min(d3, 1.E-005D);
    }
    label99:
    label102:
    double d4 = 0.1D;
    if (!bool)
    {
      if (paramDouble6 > 1.0D)
      {
        i2 = 1 + (int)Math.rint(paramDouble6);
        do
        {
          if (i2 <= 0) {
            break;
          }
          d4 /= 10.0D;
          i2 /= 10;
          if (bool) {
            break label189;
          }
          if (i11 != 0) {
            break label181;
          }
        } while (i11 == 0);
      }
      d4 = Math.min(d4, 1.E-005D);
    }
    int i2 = (int)Math.floor(paramDouble1 / paramDouble5);
    label181:
    label189:
    int i3 = (int)Math.floor(paramDouble2 / paramDouble6);
    int i4 = (int)Math.floor(paramDouble3 / paramDouble5);
    int i5 = (int)Math.floor(paramDouble4 / paramDouble6);
    int i6 = i4 - i2;
    int i7 = i5 - i3;
    if (!bool)
    {
      if (i6 != 0)
      {
        if (bool) {
          break label291;
        }
        if (Math.abs(d1) >= d3) {}
      }
      else
      {
        parame_.a(i2, Math.min(i3, i5), i2 + 1, Math.max(i3, i5) + 1);
      }
    }
    else if ((!bool) && (i11 == 0)) {
      return;
    }
    label291:
    if (!bool)
    {
      if (i7 != 0)
      {
        if (bool) {
          break label362;
        }
        if (Math.abs(d2) >= d4) {}
      }
      else
      {
        parame_.a(Math.min(i2, i4), i3, Math.max(i2, i4) + 1, i3 + 1);
      }
    }
    else if ((!bool) && (i11 == 0)) {
      return;
    }
    label362:
    double d5;
    double d6;
    double d7;
    double d8;
    int i9;
    int i10;
    if (!bool) {
      if (Math.abs(d1) > Math.abs(d2))
      {
        if (i2 > i4)
        {
          d5 = d2 / d1;
          d6 = paramDouble4;
          d7 = (Math.floor(paramDouble3 / paramDouble5) + 1.0D - i4) * d5 + paramDouble4;
          d8 = paramDouble5 * d5;
          i8 = i4;
          do
          {
            do
            {
              if (i8 >= i2) {
                break;
              }
              i9 = (int)Math.floor(d6 / paramDouble6);
              i10 = (int)Math.floor(d7 / paramDouble6);
              parame_.a(i8, i9, true);
              if (i11 != 0) {
                break label540;
              }
              if (i9 != i10)
              {
                if (bool) {
                  continue;
                }
                if (i8 < i2) {
                  parame_.a(i8, i10, true);
                }
              }
              d6 = d7;
              d7 += d8;
              i8++;
            } while (i11 == 0);
            i8 = (int)Math.floor(d6 / paramDouble6);
            parame_.a(i2, i8, true);
          } while (bool);
          if (i8 == i3) {
            label540:
            return;
          }
          parame_.a(i2, i3, true);
          if (!bool) {
            if (i11 == 0) {
              return;
            }
          }
        }
        else
        {
          d5 = d2 / d1;
          d6 = paramDouble2;
          d7 = (Math.floor(paramDouble1 / paramDouble5) + 1.0D - i2) * d5 + paramDouble2;
          d8 = paramDouble5 * d5;
        }
        i8 = i2;
        do
        {
          do
          {
            if (i8 >= i4) {
              break;
            }
            i9 = (int)Math.floor(d6 / paramDouble6);
            i10 = (int)Math.floor(d7 / paramDouble6);
            parame_.a(i8, i9, true);
            if (i11 != 0) {
              break label710;
            }
            if (i9 != i10) {
              parame_.a(i8, i10, true);
            }
            d6 = d7;
            d7 += d8;
            i8++;
          } while (i11 == 0);
          i8 = (int)Math.floor(d6 / paramDouble6);
          parame_.a(i4, i8, true);
        } while (bool);
        if (i8 == i5) {
          label710:
          return;
        }
        parame_.a(i4, i5, true);
        if ((!bool) && (i11 == 0)) {
          return;
        }
      }
    }
    if (i3 > i5)
    {
      d5 = d1 / d2;
      d6 = paramDouble3;
      d7 = (Math.floor(paramDouble4 / paramDouble6) + 1.0D - i5) * d5 + paramDouble3;
      d8 = paramDouble6 * d5;
      i8 = i5;
      do
      {
        do
        {
          if (i8 >= i3) {
            break;
          }
          i9 = (int)Math.floor(d6 / paramDouble5);
          i10 = (int)Math.floor(d7 / paramDouble5);
          parame_.a(i9, i8, true);
          if (i11 != 0) {
            break label890;
          }
          if (i9 != i10) {
            parame_.a(i10, i8, true);
          }
          d6 = d7;
          d7 += d8;
          i8++;
        } while (i11 == 0);
        i8 = (int)Math.floor(d6 / paramDouble5);
        parame_.a(i8, i3, true);
      } while (bool);
      if (i8 == i2) {
        label890:
        return;
      }
      parame_.a(i2, i3, true);
      if (!bool) {
        if (i11 == 0) {
          return;
        }
      }
    }
    else
    {
      d5 = d1 / d2;
      d6 = paramDouble1;
      d7 = (Math.floor(paramDouble2 / paramDouble6) + 1.0D - i3) * d5 + paramDouble1;
      d8 = paramDouble6 * d5;
    }
    int i8 = i3;
    do
    {
      do
      {
        if (i8 >= i5) {
          break;
        }
        i9 = (int)Math.floor(d6 / paramDouble5);
        i10 = (int)Math.floor(d7 / paramDouble5);
        parame_.a(i9, i8, true);
        if (i11 != 0) {
          break label1060;
        }
        if (i9 != i10) {
          parame_.a(i10, i8, true);
        }
        d6 = d7;
        d7 += d8;
        i8++;
      } while (i11 == 0);
      i8 = (int)Math.floor(d6 / paramDouble5);
      parame_.a(i8, i5, true);
    } while (bool);
    if (i8 != i4) {
      label1060:
      parame_.a(i4, i5, true);
    }
  }
  
  protected void a(o paramo, bb[] paramArrayOfbb, ab[] paramArrayOfab, a.d.t[] paramArrayOft, Rectangle2D[] paramArrayOfRectangle2D, boolean paramBoolean1, boolean paramBoolean2, boolean paramBoolean3)
  {
    boolean bool = o.eg;
    int i7 = o.dg;
    double d2;
    if (!bool) {
      if (e() > 0.0D)
      {
        if (!bool) {
          if (e() > 10.0D)
          {
            d1 = e();
            d2 = e();
            if (bool) {
              break label130;
            }
            if (i7 == 0) {
              break label128;
            }
          }
        }
        int i1 = (int)Math.ceil(10.0D / e());
        if ((bool) || (i1 < 1)) {
          i1 = 1;
        }
        d1 = d2 = e() * i1;
        if (bool) {
          break label130;
        }
        if (i7 == 0) {
          break label128;
        }
      }
    }
    double d1 = d2 = Math.max(f(), 25.0D);
    label128:
    label130:
    d_[] arrayOfd_ = new d_[paramArrayOfbb.length];
    int i2 = 0;
    if (i2 < paramArrayOfbb.length)
    {
      arrayOfd_[i2] = new d_();
      arrayOfd_[i2].a = i2;
      arrayOfd_[i2].b = a(paramo, paramArrayOfbb[i2], paramArrayOfab[i2], d1, d2, paramBoolean2);
    }
    for (;;)
    {
      if (!bool)
      {
        arrayOfd_[i2].c = arrayOfd_[i2].b.h.cardinality();
        i2++;
        if (i7 == 0)
        {
          if (i7 == 0) {
            break;
          }
          if (bool) {
            continue;
          }
          a.i.l.a(arrayOfd_, new Comparator()
          {
            public int compare(Object paramAnonymousObject1, Object paramAnonymousObject2)
            {
              t.d_ locald_1 = (t.d_)paramAnonymousObject1;
              t.d_ locald_2 = (t.d_)paramAnonymousObject2;
              return a.i.l.a(locald_2.c, locald_1.c);
            }
          });
        }
      }
    }
    e_ locale_ = arrayOfd_[0].b;
    int i3 = 1;
    label387:
    label417:
    do
    {
      if (i3 >= arrayOfd_.length) {
        break;
      }
      d_ locald_ = arrayOfd_[i3];
      if (!bool) {
        if (paramBoolean3)
        {
          a.d.t localt = paramArrayOft[locald_.a];
          i4 = (int)Math.round((localt.d() + localt.b() * 0.5D) / d1);
          i5 = (int)Math.round((localt.e() + localt.c() * 0.5D) / d2);
          if (bool) {
            break label417;
          }
          if (i7 == 0) {
            break label387;
          }
        }
      }
      int i4 = locale_.c + locale_.a / 2;
      int i5 = locale_.d + locale_.b / 2;
      locald_.b.a(locale_, i4, i5, this.t / this.u, paramBoolean1);
      int i6 = locald_.a;
      a(paramo, paramArrayOfbb[i6], paramArrayOfab[i6], new a.d.w(paramArrayOft[i6].d + locald_.b.a() * d1, paramArrayOft[i6].e + locald_.b.b() * d2), paramArrayOft[i6]);
      locald_.b = null;
      i3++;
    } while (i7 == 0);
  }
  
  static final class d_
  {
    int a;
    t.e_ b;
    int c;
  }
  
  static final class e_
  {
    int a;
    int b;
    int c;
    int d;
    int f;
    int g;
    private md h;
    
    e_(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      this.a = paramInt3;
      this.b = paramInt4;
      this.c = paramInt1;
      this.f = 0;
      this.d = paramInt2;
      this.g = 0;
      this.h = new md(paramInt3 * paramInt4);
    }
    
    int a()
    {
      return this.f;
    }
    
    int b()
    {
      return this.g;
    }
    
    void a(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      boolean bool = o.eg;
      int j = o.dg;
      int i = paramInt2;
      do
      {
        while (j == 0)
        {
          if (i >= paramInt4) {
            break;
          }
          a(paramInt1, paramInt3, i, true);
          i++;
        }
      } while (bool);
    }
    
    void c()
    {
      boolean bool = o.eg;
      int n = o.dg;
      int[] arrayOfInt1 = new int[this.b];
      int[] arrayOfInt2 = new int[this.b];
      int[] arrayOfInt3 = new int[this.a];
      int[] arrayOfInt4 = new int[this.a];
      int i = 0;
      do
      {
        do
        {
          if (i >= arrayOfInt1.length) {
            break;
          }
          arrayOfInt1[i] = this.a;
          arrayOfInt2[i] = -1;
          i++;
          if (bool) {
            break label90;
          }
          if (n != 0) {
            break label88;
          }
        } while (n == 0);
      } while (bool);
      i = 0;
      label88:
      label90:
      do
      {
        do
        {
          if (i >= arrayOfInt3.length) {
            break;
          }
          arrayOfInt3[i] = this.b;
          arrayOfInt4[i] = -1;
          i++;
          if (bool) {
            break label144;
          }
          if (n != 0) {
            break label142;
          }
        } while (n == 0);
      } while (bool);
      i = this.h.nextSetBit(0);
      label142:
      label144:
      int k;
      do
      {
        do
        {
          if (i < 0) {
            break;
          }
          j = i % this.a;
          k = i / this.a;
          arrayOfInt1[k] = Math.min(arrayOfInt1[k], j);
          arrayOfInt3[j] = Math.min(arrayOfInt3[j], k);
          arrayOfInt2[k] = Math.max(arrayOfInt2[k], j);
          arrayOfInt4[j] = Math.max(arrayOfInt4[j], k);
          i = this.h.nextSetBit(i + 1);
          if (bool) {
            break label256;
          }
          if (n != 0) {
            break label255;
          }
        } while (n == 0);
      } while (bool);
      i = 0;
      label255:
      int j = 0;
      label256:
      label354:
      do
      {
        do
        {
          if (j >= this.b) {
            return;
          }
          k = arrayOfInt1[j];
          do
          {
            if (k >= arrayOfInt2[j]) {
              break;
            }
            if (bool) {
              break label403;
            }
            if (n != 0) {
              break label395;
            }
            if (arrayOfInt3[k] <= j)
            {
              if (bool) {
                continue;
              }
              if (arrayOfInt4[k] >= j)
              {
                int m = k + 1;
                do
                {
                  if (arrayOfInt3[m] > j) {
                    break label354;
                  }
                  if (n != 0) {
                    break;
                  }
                  if (arrayOfInt4[m] < j) {
                    break label354;
                  }
                  m++;
                } while (n == 0);
                if (bool) {
                  break;
                }
                this.h.set(i + k, i + m);
              }
            }
            k++;
          } while (n == 0);
        } while (bool);
        i += this.a;
        j++;
      } while (n == 0);
      label395:
      label403:
      return;
    }
    
    void a(e_ parame_, int paramInt1, int paramInt2, double paramDouble, boolean paramBoolean)
    {
      boolean bool = o.eg;
      int i1 = o.dg;
      int i = this.c + this.a / 2;
      int j = this.d + this.b / 2;
      a(paramInt1 - i, paramInt2 - j);
      if (!bool) {
        if (paramBoolean)
        {
          k = 0;
          do
          {
            if (a(parame_, 0, 0, k)) {
              break;
            }
            k++;
            if ((!bool) && (i1 != 0)) {
              return;
            }
          } while (i1 == 0);
        }
      }
      int k = 0;
      int m = 0;
      label139:
      label155:
      label235:
      if (!bool)
      {
        if (!bool) {
          if (a(parame_, 0, 0)) {
            parame_.a(this);
          }
        }
        label123:
        do
        {
          return;
          break label384;
          break label235;
          break label387;
          double d1 = (k + 1) / m / paramDouble;
          double d2 = k / (m + 1) / paramDouble;
          if (d1 < 1.0D) {
            d1 = 1.0D / d1;
          }
          int n;
          do
          {
            if (d2 < 1.0D) {
              d2 = 1.0D / d2;
            }
            if (!bool)
            {
              if (d1 < d2)
              {
                k++;
                if (((!bool) && (a(parame_, -k, 0))) || ((!bool) && (a(parame_, k, 0)))) {
                  break label498;
                }
                n = 1;
                if (n > m) {
                  break label123;
                }
                if (i1 != 0) {
                  break label155;
                }
                if ((a(parame_, -k, -n)) || ((!bool) && (a(parame_, -k, n))) || ((!bool) && (a(parame_, k, -n)))) {
                  break label498;
                }
                if (!bool)
                {
                  if (a(parame_, k, n)) {
                    break label498;
                  }
                  n++;
                }
                if (i1 == 0) {
                  break;
                }
              }
              m++;
              if (bool) {
                break label139;
              }
            }
            if (((!bool) && (a(parame_, 0, -m))) || ((!bool) && (a(parame_, 0, m)))) {
              break label498;
            }
            n = 1;
            do
            {
              if (n > k) {
                break;
              }
            } while (bool);
            if (i1 != 0) {
              break label155;
            }
            if (bool) {
              break;
            }
          } while (i1 != 0);
          if ((a(parame_, n, -m)) || ((!bool) && (a(parame_, n, m))) || ((!bool) && (a(parame_, -n, -m)))) {
            break;
          }
          if (!bool)
          {
            if (a(parame_, -n, m)) {
              break;
            }
            n++;
          }
        } while (i1 == 0);
      }
      label384:
      label387:
      label498:
      parame_.a(this);
    }
    
    boolean a(e_ parame_, int paramInt1, int paramInt2, int paramInt3)
    {
      boolean bool = o.eg;
      int n = o.dg;
      if (!bool) {
        if (paramInt3 == 0) {
          return a(parame_, paramInt1, paramInt2);
        }
      }
      int i = paramInt3;
      int j = 0;
      int k = paramInt3 * paramInt3;
      int m = k;
      if (i >= j)
      {
        if (n != 0) {
          break label306;
        }
        if (a(parame_, paramInt1 + i, paramInt2 + j)) {
          return true;
        }
      }
      label297:
      while (bool)
      {
        if (!bool) {
          if (a(parame_, paramInt1 + i, paramInt2 - j)) {
            return true;
          }
        }
        if (!bool) {
          if (a(parame_, paramInt1 - i, paramInt2 + j)) {
            return true;
          }
        }
        if (!bool) {
          if (a(parame_, paramInt1 - i, paramInt2 - j)) {
            return true;
          }
        }
        if (!bool) {
          if (a(parame_, paramInt1 + j, paramInt2 + i)) {
            return true;
          }
        }
        if (!bool) {
          if (a(parame_, paramInt1 + j, paramInt2 - i)) {
            return true;
          }
        }
        if (!bool) {
          if (a(parame_, paramInt1 - j, paramInt2 + i)) {
            return true;
          }
        }
        if (!bool) {
          if (a(parame_, paramInt1 - j, paramInt2 - i)) {
            return true;
          }
        }
        if (!bool) {
          if (m < k)
          {
            m += 1 + 2 * j;
            j++;
            if (bool) {
              break label297;
            }
            if (n == 0) {
              break;
            }
          }
        }
        m += 2 - 2 * i + 2 * j;
        i--;
        j++;
        if (n == 0) {
          break;
        }
      }
      label306:
      return false;
    }
    
    private final boolean a(e_ parame_, int paramInt1, int paramInt2)
    {
      this.c += paramInt1;
      this.d += paramInt2;
      if (!o.eg)
      {
        if (!c(parame_))
        {
          this.f += paramInt1;
          this.g += paramInt2;
          return true;
        }
        this.c -= paramInt1;
        this.d -= paramInt2;
      }
      return false;
    }
    
    public void a(int paramInt1, int paramInt2, boolean paramBoolean)
    {
      boolean bool = o.eg;
      if (((bool) || (paramInt1 >= this.c)) && ((bool) || (paramInt1 < this.c + this.a)) && ((bool) || (paramInt2 >= this.d)))
      {
        if (bool) {
          break label92;
        }
        if (paramInt2 < this.d + this.b) {}
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
      label92:
      int i = (paramInt2 - this.d) * this.a + paramInt1 - this.c;
      if (!bool)
      {
        if (paramBoolean)
        {
          if (bool) {
            break label130;
          }
          this.h.set(i);
        }
      }
      else if (o.dg == 0) {
        return;
      }
      label130:
      this.h.clear(i);
    }
    
    public void a(int paramInt1, int paramInt2, int paramInt3, boolean paramBoolean)
    {
      boolean bool = o.eg;
      if (((bool) || (paramInt1 >= this.c)) && ((bool) || (paramInt2 < this.c + this.a)) && ((bool) || (paramInt3 >= this.d)))
      {
        if (bool) {
          break label92;
        }
        if (paramInt3 < this.d + this.b) {}
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
      label92:
      int i = (paramInt3 - this.d) * this.a + paramInt1 - this.c;
      int j = (paramInt3 - this.d) * this.a + paramInt2 - this.c;
      if (!bool)
      {
        if (paramBoolean)
        {
          if (bool) {
            break label155;
          }
          this.h.set(i, j);
        }
      }
      else if (o.dg == 0) {
        return;
      }
      label155:
      this.h.clear(i, j);
    }
    
    public void a(int paramInt1, int paramInt2)
    {
      this.c += paramInt1;
      this.d += paramInt2;
      this.f += paramInt1;
      this.g += paramInt2;
    }
    
    public void a(e_ parame_)
    {
      boolean bool = o.eg;
      int n = o.dg;
      if (!bool) {
        if (parame_.c >= this.c)
        {
          if (bool) {
            break label137;
          }
          if (parame_.c < this.c + this.a)
          {
            if (bool) {
              break label137;
            }
            if (parame_.d >= this.d)
            {
              if (bool) {
                break label137;
              }
              if (parame_.d < this.d + this.b)
              {
                if (bool) {
                  break label137;
                }
                if (parame_.c + parame_.a <= this.c + this.a)
                {
                  if (bool) {
                    break label212;
                  }
                  if (parame_.d + parame_.b <= this.d + this.b) {
                    break label204;
                  }
                }
              }
            }
          }
        }
      }
      label137:
      c(Math.min(parame_.c, this.c), Math.min(parame_.d, this.d), Math.max(parame_.c + parame_.a, this.c + this.a), Math.max(parame_.d + parame_.b, this.d + this.b));
      label204:
      label212:
      int i = parame_.h.nextSetBit(0);
      do
      {
        if (i < 0) {
          break;
        }
        int j = i % parame_.a + parame_.c;
        int k = i / parame_.a + parame_.d;
        int m = j - this.c + (k - this.d) * this.a;
        this.h.set(m);
        i = parame_.h.nextSetBit(i + 1);
      } while (n == 0);
    }
    
    void c(int paramInt1, int paramInt2, int paramInt3, int paramInt4)
    {
      boolean bool = o.eg;
      int n = o.dg;
      int i = paramInt3 - paramInt1;
      md localmd = new md(i * (paramInt4 - paramInt2));
      int j = this.h.nextSetBit(0);
      do
      {
        if (j < 0) {
          break;
        }
        int k = j % this.a + this.c;
        int m = j / this.a + this.d;
        localmd.set(k - paramInt1 + (m - paramInt2) * i);
        j = this.h.nextSetBit(j + 1);
        if ((!bool) && (n != 0)) {
          return;
        }
      } while (n == 0);
      this.h = localmd;
      this.c = paramInt1;
      this.d = paramInt2;
      this.a = i;
      if (!bool) {
        this.b = (paramInt4 - paramInt2);
      }
    }
    
    public boolean c(e_ parame_)
    {
      boolean bool = o.eg;
      int i6 = o.dg;
      if (!bool) {
        if (parame_.c < this.c + this.a)
        {
          if (bool) {
            break label95;
          }
          if (parame_.d < this.d + this.b)
          {
            if (bool) {
              break label95;
            }
            if (parame_.c + parame_.a > this.c)
            {
              if (bool) {
                break label97;
              }
              if (parame_.d + parame_.b > this.d) {
                break label96;
              }
            }
          }
        }
      }
      label95:
      return false;
      label96:
      label97:
      e_ locale_1 = this;
      e_ locale_2 = parame_;
      int i = Math.max(locale_1.c, locale_2.c);
      int j = Math.min(locale_1.c + locale_1.a, locale_2.c + locale_2.a);
      int k = Math.max(locale_1.d, locale_2.d);
      int m = Math.max(locale_1.d + locale_1.b, locale_2.d + locale_2.b);
      if (!bool) {
        if (i < j)
        {
          if (bool) {
            break label463;
          }
          if (k < m)
          {
            int n = locale_1.a(i, k, i, k, j, m);
            int i1 = locale_2.a(i, k, i, k, j, m);
            label389:
            label397:
            label406:
            label457:
            do
            {
              int i2;
              int i4;
              do
              {
                int i3;
                int i5;
                do
                {
                  do
                  {
                    if (n < 0) {
                      break label460;
                    }
                    if (i6 != 0) {
                      break label461;
                    }
                    if (i1 < 0) {
                      break label460;
                    }
                    i2 = n % locale_1.a + locale_1.c;
                    i3 = i1 % locale_2.a + locale_2.c;
                    i4 = n / locale_1.a + locale_1.d;
                    i5 = i1 / locale_2.a + locale_2.d;
                    if (bool) {
                      break label406;
                    }
                    if (i4 != i5) {
                      break label397;
                    }
                    if (!bool)
                    {
                      if (i2 == i3) {
                        return true;
                      }
                      if (bool) {
                        break label389;
                      }
                    }
                    if (i2 >= i3) {
                      break;
                    }
                    n = locale_1.a(i3, i5, i, k, j, m);
                    if (bool) {
                      break label389;
                    }
                  } while (i6 == 0);
                  i1 = locale_2.a(i2, i4, i, k, j, m);
                } while ((!bool) && (i6 == 0));
                if (bool) {
                  break label457;
                }
                if (i4 >= i5) {
                  break;
                }
                n = locale_1.a(i3, i5, i, k, j, m);
                if (bool) {
                  break label457;
                }
              } while (i6 == 0);
              i1 = locale_2.a(i2, i4, i, k, j, m);
            } while (i6 == 0);
            label460:
            label461:
            return false;
          }
        }
      }
      label463:
      return false;
    }
    
    static int a(e_ parame_, int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
    {
      boolean bool = o.eg;
      int k = o.dg;
      int i = paramInt1 - parame_.c + (paramInt2 - parame_.d) * parame_.a;
      paramInt3 -= parame_.c;
      paramInt5 -= parame_.c;
      paramInt4 -= parame_.d;
      paramInt6 -= parame_.d;
      if (((bool) || (i >= 0)) && ((bool) || (i % parame_.a >= paramInt3)) && ((bool) || (i % parame_.a < paramInt5))) {
        if (!bool)
        {
          if (i / parame_.a < paramInt4) {
            break label145;
          }
          if (bool) {
            break label142;
          }
        }
      }
      label142:
      label145:
      int j = i / parame_.a < paramInt6 ? 1 : 0;
      if (j == 0)
      {
        if (!bool) {
          if (i % parame_.a < paramInt3)
          {
            i += paramInt3 - i % parame_.a;
            if (bool) {
              break label219;
            }
            if (k == 0) {
              break label210;
            }
          }
        }
        i += parame_.a - i % parame_.a;
      }
      label210:
      label219:
      i = parame_.h.nextSetBit(i);
      label296:
      label299:
      do
      {
        if (i < 0) {
          return -1;
        }
        do
        {
          if (((bool) || (i % parame_.a >= paramInt3)) && ((bool) || (i % parame_.a < paramInt5))) {
            if (!bool)
            {
              if (i / parame_.a < paramInt4) {
                break label299;
              }
              if (bool) {
                break label296;
              }
            }
          }
          j = i / parame_.a < paramInt6 ? 1 : 0;
          if (j == 0) {
            break;
          }
        } while (bool);
      } while (k != 0);
      return i;
    }
    
    public final int a(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5, int paramInt6)
    {
      boolean bool = o.eg;
      int k = o.dg;
      int i = paramInt1 - this.c + (paramInt2 - this.d) * this.a;
      paramInt3 -= this.c;
      paramInt5 -= this.c;
      paramInt4 -= this.d;
      paramInt6 -= this.d;
      if (((bool) || (i >= 0)) && ((bool) || (i % this.a >= paramInt3)) && ((bool) || (i % this.a < paramInt5))) {
        if (!bool)
        {
          if (i / this.a < paramInt4) {
            break label145;
          }
          if (bool) {
            break label142;
          }
        }
      }
      label142:
      label145:
      int j = i / this.a < paramInt6 ? 1 : 0;
      if (j == 0)
      {
        if (!bool) {
          if (i % this.a < paramInt3)
          {
            i += paramInt3 - i % this.a;
            if (bool) {
              break label219;
            }
            if (k == 0) {
              break label210;
            }
          }
        }
        i += this.a - i % this.a;
      }
      label210:
      label219:
      i = this.h.nextSetBit(i);
      label296:
      label299:
      do
      {
        if (i < 0) {
          return -1;
        }
        do
        {
          if (((bool) || (i % this.a >= paramInt3)) && ((bool) || (i % this.a < paramInt5))) {
            if (!bool)
            {
              if (i / this.a < paramInt4) {
                break label299;
              }
              if (bool) {
                break label296;
              }
            }
          }
          j = i / this.a < paramInt6 ? 1 : 0;
          if (j == 0) {
            break;
          }
        } while (bool);
      } while (k != 0);
      return i;
    }
    
    public String toString()
    {
      boolean bool = o.eg;
      int m = o.dg;
      StringBuffer localStringBuffer = new StringBuffer(this.a * this.b + this.b + 1);
      int i = 0;
      int j = 0;
      label109:
      do
      {
        if (j >= this.b) {
          break;
        }
        int k = 0;
        do
        {
          do
          {
            if (k >= this.a) {
              break label109;
            }
            if (m != 0) {
              break;
            }
            if (this.h.get(i))
            {
              localStringBuffer.append('#');
              if (bool) {
                continue;
              }
              if (m == 0) {}
            }
            else
            {
              localStringBuffer.append('.');
            }
            i++;
            k++;
          } while (m == 0);
          localStringBuffer.append('\n');
          j++;
        } while (bool);
      } while (m == 0);
      return "x: " + this.c + " y: " + this.d + "\n" + localStringBuffer.toString();
    }
  }
  
  static final class f_
  {
    bb a = new bb();
    ab b = new ab();
    Point2D.Double d = new Point2D.Double();
    Rectangle2D.Double e = new Rectangle2D.Double();
    Point2D.Double f = new Point2D.Double();
    Rectangle2D.Double g = new Rectangle2D.Double();
    Rectangle2D.Double h = new Rectangle2D.Double();
    a.d.t i;
    boolean j = true;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.t

 * JD-Core Version:    0.7.0.1

 */